/**
 * 用户请求模块的封装
 */
import request from '@/utils/request.js'
// import store from '@/store'
// 用户登录模块
export const login = (data) => {
  // 返回的是一个promise异部对象
  return request({
    url: '/app/v1_0/authorizations',
    method: 'POST',
    data
  })
}
// 获取验证码
export const sendSms = (mobile) => {
  return request({
    url: `/app/v1_0/sms/codes/${mobile}`,
    methods: 'GET'
  })
}
// 获取数据
export const getUserInfo = () => {
  return request({
    url: '/app/v1_0/user',
    method: 'GET'
    // headers: {
    //   Authorization: `Bearer ${store.state.user.token}`
    // }
  })
}

// 获取全部的频道列表数据
export const getChannelList = () => {
  return request({
    methods: 'GET',
    url: '/app/v1_0/user/channels'
  })
}
